<%@ page language="java" pageEncoding="UTF-8"
         contentType="text/html;charset=UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
    request.setAttribute("basePath", basePath);
%>
<!DOCTYPE>
<html>
<head>
    <title>明细信息</title>
    <%@ include file="/resources/js/easyui/taglibs.jsp" %>
    <%@ include file="/resources/js/easyui/_easyui.jsp" %>
    <%@ include file="/resources/js/easyui/_message.jsp" %>
    <%@ include file="/resources/js/easyui/_viewJS.jsp" %>
</head>

<body class="easyui-layout">
<form id="editform">
    <table class="tableForm" style="width: 100%;">
        <tr>
            <th align="right" valign="top"><span class="redStart">*</span><label>姓名：</label></th>
            <td><input class="easyui-validatebox easyui-textbox" value="${persong.name}" name="personname"
                       data-options="required:true"
                       style="width:200px"/></td>
        </tr>

        <tr>
            <th align="right" valign="top"><span class="redStart">*</span><label>手机号码：</label></th>
            <td><input class="easyui-validatebox easyui-textbox" value="${persong.mobile}" name="personmobile"
                       data-options="required:true" style="width:200px"/></td>
        </tr>

        <tr>
            <th align="right" valign="top"><span class="redStart">*</span><label>邮箱：</label></th>
            <td><input class="easyui-validatebox easyui-textbox" value="${persong.email}" name="personemail"
                       style="width:200px"/></td>
        </tr>
    </table>
    <input value="${persong.id}" type="hidden" name="auditpersonid"/>
</form>

<script type="application/javascript">
    function edit() {
        if ($("#editform").form('validate')) {
            $.ajax({
                url: '${basePath}web/auditperson/editinfo',
                type: 'POST',
                data: $("#editform").serialize(),
                async: false, //默认为true 异步
                traditional: true,
                error: function (response) {
                    ViewHelper.func.ajaxErrorMessage(response);
                },
                success: function (ret) {
                    if (ret.result) {
                        $.messager.alert('提示信息！', ret.info, 'info');
                        parent.view.closeEditWin(1);
                        $("#editform").form('clear');
                    } else {
                        $.messager.alert('提示', '保存失败!', 'error');
                    }
                }
            });
        }
    }
</script>
</body>
</html>
